<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVegetationsTable extends Migration
{
    /**
     * Run the migrations.
     *园林植被分类表
     *
     * @return void
     */
    public function up()
    {
        Schema::create('vegetations', function (Blueprint $table) {
            //字段定义
            $table->increments('id');
            // $table->string('type',20)->comment('植被类型');
            $table->string('name',40)->comment('植被名称');
            // $table->integer('number')->unsigned()->comment('植被株数');
            // $table->string('version',20)->comment('植被规格')->nullable(true);
            // $table->string('unit')->comment('计量单位');
            // $table->string('sign',80)->comment('植被生长情况');
            $table->char('property',20)->comment('类型属性 0点 1面')->default(1);
            $table->string('color',20)->comment('颜色')->nullable();
            $table->integer('sort')->unsigned()->comment('排序')->default(100);
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('vegetations');
    }
}
